import BaseUrl from "./BaseUrl";

/**
 * 上传请继承这个
 */
export default class BaseUpload extends BaseUrl{
    contentType(){
        return BaseUrl.CONTENT_TYPE_UPLOAD;
    }
    body():Promise{
        return new Promise((resolve, reject) => {
            let formData = new FormData();
            for(let key in this){
                if(this[key]!=undefined){
                    formData.append(key,this[key]);
                }
            }
            resolve(formData);
        })
    }
}